<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./jquery.js"></script>
    <style>
        body {
            margin: 0;
            padding: 0
        }
        
        .wapper {
            position: relative;
            margin: auto;
            text-align: center;
            width: 880px;
            height: 446px;
            border: 1px solid saddlebrown;
        }
        
        .wapper>ul {
            margin: 0;
            padding: 0;
            width: 100%;
            height: 100%
        }
        
        .wapper>ul>li {
            list-style: none;
            float: left;
            border: 10px solid slateblue
        }
        
        img {
            width: 200px;
            height: 200px;
        }
    </style>
</head>

<body>

    <div id="warp" class="wapper">
        <ul>
            <li>
                <a href="#"></a><img src="./images/js01.png" alt=""></li>
            <li>
                <a href="#"></a><img src="./images/js02.png" alt=""></li>
            <li>
                <a href="#"></a><img src="./images/js03.png" alt=""></li>
            <li>
                <a href="#"></a><img src="./images/js04.png" alt=""></li>
            <li>
                <a href="#"></a><img src="./images/js05.png" alt=""></li>
            <li>
                <a href="#"></a><img src="./images/js06.png" alt=""></li>
            <li>
                <a href="#"></a><img src="./images/js07.png" alt=""></li>
            <li>
                <a href="#"></a><img src="./images/js08.png" alt=""></li>
        </ul>
    </div>
    <br>

    <div id="warp2" class="wapper">
        <ul>
            <li>
                <a href="#"></a><img src="./images/js01.png" alt=""></li>
            <li>
                <a href="#"></a><img src="./images/js02.png" alt=""></li>
            <li>
                <a href="#"></a><img src="./images/js03.png" alt=""></li>
            <li>
                <a href="#"></a><img src="./images/js04.png" alt=""></li>
            <li>
                <a href="#"></a><img src="./images/js05.png" alt=""></li>
            <li>
                <a href="#"></a><img src="./images/js06.png" alt=""></li>
            <li>
                <a href="#"></a><img src="./images/js07.png" alt=""></li>
            <li>
                <a href="#"></a><img src="./images/js08.png" alt=""></li>
        </ul>
    </div>
</body>
<script>
    $(function() {

        $("#warp>ul>li").mouseenter(function() {
            $('#warp>ul>li').css("opacity", 0.5);
            $(this).css("opacity", 1)
        });

        $("#warp>ul>li").mouseleave(function() {
            $('#warp>ul>li').css("opacity", 1)
        })

    })


    $(function() {

        $("#warp2>ul>li").mouseenter(function() {
            $(this).css("opacity", 1).siblings('li').css('opacity', 0.5)
        });

        $("#warp2").mouseleave(function() {
            $(this).find("li").css("opacity", 1)
        })
    })
</script>

</html>